import request from '@/utils/request'
// 获取全部档案
export function getRecordInfoList () {
  return request({
    url: '/wms/goods/getRecordInfoList',
    method: 'get',
  })
}

// 获取所有商品信息
export function selectGoodsInfoList (storageId) {
  if (storageId == null) {
    storageId = ""
  }
  return request({
    url: '/wms/goods/SelectGoodsList',
    method: 'get',
    params: {
      "storageId": storageId
    }
  })
}
// 修改商品状态
export function changeGoodsStatus (id, goodsStatus) {
  return request({
    url: '/wms/goods/changeGoodsStatus',
    method: 'get',
    params: {
      id, goodsStatus
    }
  })
}
// 查询商品信息列表
export function listGoods (query) {
  return request({
    url: '/wms/goods/list',
    method: 'get',
    params: query
  })
}

// 查询商品信息详细
export function getGoods (id) {
  return request({
    url: '/wms/goods/' + id,
    method: 'get'
  })
}

// 新增商品信息
export function addGoods (data) {
  return request({
    url: '/wms/goods',
    method: 'post',
    data: data
  })
}

// 修改商品信息
export function updateGoods (data) {
  return request({
    url: '/wms/goods',
    method: 'put',
    data: data
  })
}

// 删除商品信息
export function delGoods (id) {
  return request({
    url: '/wms/goods/' + id,
    method: 'delete'
  })
}
